package com.scujj.cs6.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.scujj.cs6.model.dto.user.UserEmailLoginDTO;
import com.scujj.cs6.model.dto.user.UserInfoUpdateDTO;
import com.scujj.cs6.model.dto.user.UserPhoneLoginDTO;
import com.scujj.cs6.model.dto.user.UserRegisterDTO;
import com.scujj.cs6.model.entity.User;
import com.scujj.cs6.model.vo.UserSimpleVo;
import com.scujj.cs6.model.vo.UserVo;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;

/**
* @author FlanChan
* @description 针对表【user】的数据库操作Service
* @createDate 2025-03-25 21:21:24
*/
public interface UserService extends IService<User> {

    UserSimpleVo getUserByToken(HttpServletRequest request);

    void emailLogin(@Valid UserEmailLoginDTO loginDTO, HttpServletRequest request,HttpServletResponse response);

    void phoneLogin(@Valid UserPhoneLoginDTO loginDTO, HttpServletRequest request, HttpServletResponse response);

    void createUser(@Valid UserRegisterDTO registerDTO);

    void logout(HttpServletRequest request, HttpServletResponse response);

    void updateUser(@Valid UserInfoUpdateDTO userInfoUpdateDTO, HttpServletRequest request);

    UserSimpleVo getUserById(Long id);

    UserVo getUserDetailByToken(HttpServletRequest request);

    UserVo getUserDetailById(Long id);

    String updateUserAvatar(Long userId, String url);
}
